<#include "../../select.ftl" />
<#include "../../ajaxPage.ftl" />
<div class="modal-dialog wide" style="width: 750px;">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            <h4 class="modal-title" id="myModalLabel">选中客户</h4>
        </div>
        <div class="modal-body">
            <div id="showMessages"><#include "../../message.ftl" /></div>

            <form id="search_illIndex_select2" action="${absoluteContextPath}/system/user/ajaxSelect"
                  method="post">
                <input type="hidden" name="pageSize" value="${usersTable.page.pageSize}"/>
                <input type="hidden" name="currentPage" value="${usersTable.page.currentPage}"/>
                <input type="hidden" name="selectType" value="Multiselect"/>

                <div class="row">
                    <div class="form-group col-md-4">
                        <label class="col-sm-5 control-label" for="exampleInputEmail2">用户名称</label>

                        <div class="col-sm-7">
                            <input class="form-control" name="userName"
                                   value="${userParams.userName!''}" placeholder="" type="text">
                        </div>
                    </div>

                    <div class="form-group col-md-4">
                        <button type="button" class="btn btn-primary" onclick="refreshSelectTables(1)">查询
                        </button>
                        <button type="reset" class="btn btn-default">重置</button>
                    </div>
                </div>
            </form>
            <section class="tile">
                <div class="tile-body nopadding">
                    <div class="table-responsive" id="selectContent2">
                    <#include "selectTables.ftl"/>
                    </div>
                </div>
            </section>
        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true">取消</button>
            <button id="confirm" type="button" class="btn btn-primary">确定</button>
        </div>
    </div>
</div>
<script>
    function refreshSelectTables(currentPage) {
        if (currentPage) {
            $("input[name=currentPage]").val(currentPage);
        }
        $("#search_illIndex_select2").ajaxSubmit({
            beforeSend: showLoading,
            success: function (data) {
                var data = JSON.parse(data);
                if (data.returnCode == 1) {
                    $("#selectContent2").html(data.content.data);
                } else {
                    $.showMessage({parentId: "showMessage", message: "表格数据加载异常！", type: "success"});
                }
            }
        });
    }
</script>



